From: Rui Matos Date: Mon, 22 Aug 2016 14:56:41 +0000 (+0200) Subject: windowManager: Fix windows not getting undimmed in some cases X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~733 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dbd04df31111344206a04d867e6b579064d850c8;p=gnome-shell.git windowManager: Fix windows not getting undimmed in some cases meta_window_foreach_transient() iterates through all transients of a window, not only direct transients. This means that simply checking if a transient is an attached dialog isn't enough because it might be a non-direct transient for the window we're checking, in which case we don't want to dim the window. In particular this fixes windows not getting undimmed when they have more that one level of transient children and the direct transient gets destroyed. In that case we would still find at least one non-direct transient child and decide to keep the window dimmed. https://bugzilla.gnome.org/show_bug.cgi?id=770163 --- diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 51ce482c4..5222b986d 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1349,9 +1349,13 @@ const WindowManager = new Lang.Class({ _hasAttachedDialogs: function(window, ignoreWindow) { var count = 0; window.foreach_transient(function(win) { - if (win != ignoreWindow && win.is_attached_dialog()) + if (win != ignoreWindow && + win.is_attached_dialog() && + win.get_transient_for() == window) { count++; - return false; + return false; + } + return true; }); return count != 0; },